﻿Public Class Lista

    Public Sub carga_pedidos(ByVal dia As Date)
        Dim dtPed As New DataTable
        dtPed = dsData.Tables("FACTURAS").Clone
        For Each fila As DataRow In dsData.Tables("FACTURAS").Select("FECHA='" & Format(dia, "dd/MM/yyyy") & "'")
            dtPed.ImportRow(fila)
        Next
        dgLista.DataSource = dtPed

        dgLista.Columns("ENTREGA").Visible = False
        dgLista.Columns("USUARIO").Visible = False
        dgLista.Columns("TIPO").Visible = False
        dgLista.Columns("SUBTOTAL").DefaultCellStyle.Format = "$ ###,###,##0.00"
        dgLista.Columns("IVA").DefaultCellStyle.Format = "$ ###,###,##0.00"
        dgLista.Columns("TOTAL").DefaultCellStyle.Format = "$ ###,###,##0.00"

        If dgLista.SelectedRows.Count > 0 Then
            dgLista.SelectedRows(0).Selected = False
        End If
    End Sub

    
    Private Sub dgLista_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgLista.CellContentClick

    End Sub
End Class